<?php
/**
 * 
 * 登陆验证
 * @author alang
 *
 */

class Login_mdl extends CI_Model
{
	
	public function __construct()
	{
		parent::__construct();
	}
	
	/**
	 * 
	 * 检验用户登录
	 * @param int $uid
	 * @param String $email
	 * @param String $token
	 */
	public function  _checklogin($uid,$email,$token)
	{
		
		$key = $uid.'_'.$email;
		$this->load->library('auth');
		$sessiondata = $this->session->userdata($key);
		
		if (empty($sessiondata)) {
			
			return false;
			
		} else {
			
			if ($token == $sessiondata['token']) {
				
				return true;
				
			} else {
				
				return false;
			}
			
		}
			
	}
	
	
}